import axios from "axios";

export const service = axios.create({
  baseURL: import.meta.env.VITE_APP_API_BASE_URL,
  headers: {
    "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
    Accept: "application/json",
    "X-Requested-With": "XMLHttpRequest",
  },
  timeout: 1000 * 10,
});
service.interceptors.request.use(
  response => {
    return response;
  },
  error => {
    return Promise.reject(error);
  }
);
service.interceptors.response.use(
  response => {
    return response;
  },
  error => {
    return Promise.reject(error);
  }
);
